Skip to content

Working with Wavefront Phase Modifier Twins in VirtualLab Fusion

🎬 Overview

This tutorial introduces the Wavefront Phase Modifier twins available in VirtualLab Fusion and explains how to select the appropriate component and define its wavefront.

Wavefront Phase Modifier twins are Functional Digital Twins that modify the wavefront of an incoming optical field. They are especially useful during early-stage optical design, when the intended function of a component is already known but its physical structure has not yet been designed.

For example, a Wavefront Modifier can be used as a precursor to a metalens component. It allows you to define and evaluate the required lens function before mapping that function to a realizable nanostructure.

With VirtualLab Fusion 2026.2, four Wavefront Modifier twins are available:

Twin Geometry Meaning of the Defined Wavefront
Wavefront Modifier [Plane, Output-Defined] Fixed planar surface Defines the complete outgoing wavefront
Wavefront Modifier [Plane, Profile-Defined] Fixed planar surface Defines the wavefront difference added to the incoming field
Wavefront Modifier [Surface, Output-Defined] User-selectable catalog surface Defines the complete outgoing wavefront
Wavefront Modifier [Surface, Profile-Defined] User-selectable catalog surface Defines the wavefront difference added to the incoming field

The workflow consists of three main steps:

  1. Select the component geometry – choose between a fixed plane and a user-selectable surface
  2. Select the wavefront interpretation – define either the resulting output wavefront or an additive wavefront profile
  3. Define the wavefront – use radial polynomials, imported data, or a user-defined formula

🚀 Step-by-Step Tutorial

Step 1: Selecting Plane or Surface Geometry

The Plane and Surface variants differ in the geometry on which the wavefront modification is applied.

Plane Variants

The Plane variants use a predefined planar surface. The surface geometry is fixed and cannot be replaced by another surface type.

Use a Plane variant when the wavefront modification is applied in a flat reference plane and no additional surface geometry is required.

The following twins use a fixed planar surface:

  • Wavefront Phase Modifier [Plane, Output-Defined]
  • Wavefront Phase Modifier [Plane, Profile-Defined]

Surface Variants

The Surface variants allow you to select a surface from the VirtualLab Fusion surface catalog.

Use a Surface variant when the wavefront phase modification must be associated with a curved, tilted, or otherwise configurable optical surface.

The following twins provide a user-selectable surface:

  • Wavefront Phase Modifier [Surface, Output-Defined]
  • Wavefront Phase Modifier [Surface, Profile-Defined]

💡 Which variant should I use?
Select a Plane variant for a wavefront modification in a fixed planar reference plane. Select a Surface variant when the geometry of the optical interface must be configured explicitly.


Step 2: Selecting Output-Defined or Profile-Defined Behavior

The terms Output-Defined and Profile-Defined specify what the wavefront entered in the component represents.

Profile-Defined Twins

For a Profile-Defined twin, the specified wavefront represents a difference profile that is applied to the incoming wavefront.

Conceptually, the outgoing wavefront is given by

\[ \Phi_{\mathrm{out}}(\mathbf{r}) = \Phi_{\mathrm{in}}(\mathbf{r}) + \Phi_{\mathrm{profile}}(\mathbf{r}). \]

The existing wavefront of the incoming field is therefore preserved, while the defined profile is added as a modification.

Use a Profile-Defined twin when you want to describe the wavefront change introduced by an optical component, such as the phase profile added by a lens.

Output-Defined Twins

For an Output-Defined twin, the specified wavefront represents the target output wavefront. It replaces the wavefront of the incoming field.

Conceptually, the outgoing wavefront is given by

\[ \Phi_{\mathrm{out}}(\mathbf{r}) = \Phi_{\mathrm{defined}}(\mathbf{r}). \]

The original incoming wavefront does not contribute to the resulting wavefront shape. Use an Output-Defined twin when the desired wavefront after the component is known directly, independent of the incoming wavefront.

💡 An Illustrative Example:
This difference between the two types becomes particularly clear when the defined profile is zero. The Profile-Defined version will simply do nothing in this case, while the Output-Defined version generates a collimated beam.


Step 3: Defining the Wavefront

All four Wavefront Modifier twins provide the same three methods for defining the wavefront:

  • Even Order Radial Polynomial
  • Data-Based
  • User-Defined Formula

The selected method determines how the wavefront values and their spatial variation are provided to the component.


Option 1: Even Order Radial Polynomial

The Even Order Radial Polynomial option defines a rotationally symmetric wavefront using even powers of the normalized radial coordinate.

The wavefront is described by

\[ \Phi(r) = \sum_{i} A_i \rho^{2i}, \]

where:

  • \(\Phi(r)\) is the wavefront value at radial position \(r\),
  • \(A_i\) are the polynomial coefficients,
  • \(\rho\) is the normalized radial coordinate,
  • and \(i\) specifies the polynomial order.

Because only even powers of the radial coordinate are used, this representation is suitable for rotationally symmetric wavefronts such as spherical, aspherical, and idealized lens profiles.

The coefficients can be provided in two ways:

  1. Manual definition – enter the polynomial coefficients directly in the component dialog.
  2. Zemax import – import the corresponding coefficients from a supported Zemax surface definition.

Option 2: Data-Based Definition

The Data-Based option defines the wavefront from a two-dimensional data array.

Both of the following data formats are supported:

  • Gridded data, in which the wavefront is sampled on a regular two-dimensional grid
  • Gridless data, in which the samples are provided at individually specified positions

The data can originate from different sources:

  • A data array generated within VirtualLab Fusion
  • The result of another component, such as a Field Monitor that outputs wavefront data
  • A wavefront data set imported from a text file

This option is useful when the wavefront has been measured, calculated externally, obtained from another simulation, or cannot be represented conveniently by a radial polynomial.

Sampling Considerations

The sampling configuration of the imported data must be chosen carefully. This is particularly important for rotationally symmetric wavefronts.

For a grid with an even number of samples, the physical center of the grid,

\[ (x,y) = (0\,\mathrm{m},0\,\mathrm{m}), \]

is located between sample points and is therefore not sampled directly.

As a result, the sampled data can contain a small spatial offset relative to the physical center of the wavefront.

This effect is especially visible when representing the wavefront of an ideal lens. If the ideal lens wavefront is sampled using an even number of samples, the center of the sampled profile is shifted slightly. The resulting focal spot is displaced by the corresponding amount.

⚠️ Sampling recommendation:
When the physical center of a rotationally symmetric wavefront must be represented explicitly, use an odd number of samples along both spatial dimensions. This ensures that the point \((0,0)\) is included in the sampling grid.


Option 3: User-Defined Formula

The User-Defined Formula option allows you to implement an arbitrary wavefront definition using VirtualLab Fusion snippet technology.

The snippet is evaluated at the individual positions of the component surface. For every position, represented by the parameter position of type VectorD, the snippet must define:

  • The wavefront value at the specified position
  • The spatial gradient of the wavefront at that position

The gradient is required in addition to the wavefront value because the local propagation behavior depends on the spatial variation of the wavefront.

This method provides the greatest flexibility and can be used for wavefronts that cannot be described conveniently by polynomial coefficients or imported data.

Typical applications include:

  • Analytic freeform wavefronts
  • Piecewise-defined wavefront functions
  • Parameter-dependent optical functions
  • Custom wavefronts based on external or application-specific equations

💡 Implementation note:
Ensure that the implemented gradient is mathematically consistent with the wavefront value. An incorrect or discontinuous gradient can lead to propagation behavior that does not correspond to the intended wavefront.


📌 In the print dialog, choose "Save as PDF". For a clean PDF without URLs or page numbers, uncheck "Headers and footers" in "More settings".

Tags: wavefront modifier functional digital twin wavefront profile optical design VirtualLab Fusion